The rotational spectrum of 17O2 up to the THz region