Compiler flag -DWIN32 added because it does not always seem to be defined by default, depending on the compiler and MATLAB version in Windows