Add max_<type>_len option to unpacker. (fixes #97).

And fix build error on 32bit environment (fixes #102).