On the solution of a class of quadratic programs using a differentiable exact penalty function