Photoelectron spectra of the MgH − and MgD − anions