Fix build with mingw
Merge pull request #1 from Tasssadar/master

Build under mingw and gcc 4.6