Fix build on Ruby18. We should specify endian for UTF16/32.

I found build error the following url.

https://travis-ci.org/mikel/mail/jobs/3381626

I think we should specify endian for UTF16/32.