Fixes for MXE cross-compile
Merge pull request #371 from mpetroff/mingw32-fixes

Fixes for MXE cross-compile