Fixed compilation issues with mingw

Fixed compilation issues with mingw