Stabilization and tuning of a doubly resonant optical parametric oscillator