The role of surface trapping in photovoltage spectroscopy