Fixed issues with 64-bit MSVC compilation.