Fix compilation on MinGW-w64
Merge pull request #820 from jtanx/win32

Fix compilation on Windows (MinGW-w64)