Fixes for the MEX file compilation under Windows