Fixed compiling on MinGW