Support 64-bit on Windows

This corresponds to v4 of @slonopotamus' [patch series](http://thread.gmane.org/gmane.comp.version-control.msysgit/20985), rebased onto msysGit's master.