Manually encoded little endian integers in Ruby.

Since only 1.9.3 supports explicit little endian directives in
Array#pack, we manually encoded 32bit and 64bit integers when using pure
Ruby.