Measurements of the viscosity of compressed gaseous and liquid nitrogen