Added fix for 64bit numbers in lib/encoder

from pull request #20 by @pwmckenna