extend BigInteger so that prototype methods are picked up by browserify
simplify buffer to array conversion