make compatible with different bitcoinjs-lib version.