Proton magnetic resonance study of molecular motion in (NH4)2HAsO4 and (NH4)2HPO4