Resolves memory failure in NonlinearProgramSnoptmex on win32

The purpose is to reduce the number of calls to`mxGetPr`?