Partial penalization for the solution of generalized Nash equilibrium problems