Fix compilation on MinGW with GCC 4.7.2

Changes found necessary to get a successful build under MinGW with GCC 4.7.2