Patched it to work with mingw cross compiling
Merge pull request #236 from benishor/develop

Patched it to work with mingw cross compiling