Implemented zend_bigint_to_long for LibTomMath