Refined algebraic quantization in the oscillator representation of SL(2,R)