Analytical solution to the problem of free vibrations of a quadratic nonlinear oscillator with dry friction