Add support for encoding int32 and int64 types