On the ab initio evaluation of the solvent shift of electronic absorption spectra