A successive quadratic programming method for nonsmooth variational inequalities