Adsorption of water on the MgO(001) surface