Quantitative prediction of absorption maxima in the electronic spectra of unsaturated compounds: Extrapolation from fragments to molecules in quantum chemical calculations