Additional changes required for MSVC to compile ledger.
These changes only matter if ledger is compiled with USE_PYTHON.