Oscillations of a quadratically damped pendulum