Fix bignum conversions similarly to pull #182.