Electron-impact excitation of metastable argon and krypton