Measurement of the neutral to charged current cross section ratio in neutrino and antineutrino interactions