Fix some 64/32 bit compatibility issues.
Add 64-bit targets to the Visual Studio 12 project.