Fixed compiling with mingw64
Fixed 64-bit warnings