Collisional deactivation of excited ions of carbon dioxide and nitrous oxide