Fix warnings when compiling with mingw32