Frequency-noise cancellation in optomechanical systems for ponderomotive squeezing