Compilation fixes for MinGW32