Fixes for MinGW32 (gcc 4.8.1)

Building under MinGW32 some minor things did not work. There changes address the issues.