Dipole moment functions of carbon dioxide and nitrous oxide