Fixed compile on MINGW so it is confirmed working on versions 4.6.x till 4.9.x