modified mex file to properly handle no Ax=b constraint.