Gas adsorption on semiconducting oxides: A change in the work function