Fixed a bug that variable encoding doesn't work for ints that use all 64 bits.

Thanks @shivaram for helping out with debugging.