Merge pull request #254 from Alexpux/mingw-w64-builds

Change OS detection method
Move Windows code to appropriate config