Use intptr_t instead of long for casting pointers to integers

This fixes building on mingw-w64.

Include stdint.h on everything except MSVC for definitions of
common standard types, include stddef.h on MSVC instead, since
MSVC doesn't have stdint.h in all older versions that are
supposed to be supported, but MSVC always defines intptr_t via
stddef.h.
Add support for 64 bit mingw in the makefiles

By setting an overridable variable in the main makefile, we avoid
having to move the default -DUNIX64 into each of the other unix
platform makefiles, but still allowing the mingw platform to
override it.
Merge pull request #132 from mstorsjo/mingw64

Add support for building on 64 bit mingw