Electronic excitations of CO adsorbed on MgO(001)