Merge pull request #2333 from 1480c1/mingw-w64

Common: include standard headers before doing any defines