Ab initio molecular dynamics of H2O adsorbed on solid MgO