Determination of the quadratic hyperpolarizability of trans-4-[4-(dimethylamino)styryl]pyridine and 5-dimethylamino-1,10-phenanthroline from solvatochromism of absorption and fluorescence spectra: a comparison with the electric-field-induced second-harmonic generation technique