Measurement of the opacity of ionized helium in the intergalactic medium