Implement serializing an unsigned short.

Closes #292.