ledger: fix missing gmp dependency.

Closes #22352.