Transition to turbulence in oscillating pipe flow