Solvent-induced changes in the photophysical properties of N-alkylphthalimides