Calculating anharmonic vibrational frequencies of molecules adsorbed on surfaces directly from ab initio energies with a molecule-independent method: H2O on Pt(111)