Mingw compability
Merge pull request #334 from trett/master

Mingw compability