Measurement of two-photon-absorption spectra through nonlinear fluorescence produced by a line-shaped excitation beam