ledger: fix --with-python build