Fix compilation issues with mingw and gcc 4.7.1