Fix for building on win32 mingw-msys

Fixes compiling on win32 when using mingw-msys to build.