Fix some errors in QuadraticProgram to use the updated NonlinearProgram