Aligning electronic energy levels at the TiO2/H2O interface