Fix bug with ulong/uint/size_t mismatch.
Fix 32bit compiling on OS X

Linking doesn’t work on my machine because I have a 64 bit install of
Phobos