Nonequilibrium molecular dynamics calculation of the shear viscosity of carbon dioxide