libspatialindex does not compile cleanly on Mingw64

Theuns wants to compile 64bit binaries using Mingw64. We need to fix some stuff to support that.