Drift velocity and longitudinal diffusion coefficient of electrons in nitrogen and carbon monoxide