FIX: Fixes for x64 windows

Ready for review/merge @dengemann. Made some changes needed for running on 64-bit Windows/Python.