Matlab compilation more Windows friendly.
Fixing some Windows issues in mwrapper.