Fix: bignum/scriptnum tests on Windows x64/LLP64 systems

Please note, this is cherry-picked from upstream.

When running the tests on Windows x64 there are 798 scriptnum_tests failures. This affects Master Core, as well as the official release of Bitcoin 0.9.3 and earlier. The underlying reason appears to be that `long int` is only 32 bit wide on LLP64 systems.

Even though it's hand picked, I made sure there are no side effects and this is safe to adopt. ;)

See in particular https://github.com/bitcoin/bitcoin/issues/5456 to confirm, which I created when I noticed the failed tests after building mscore-0.0.9 via Gitian for Windowx 64.