Do not encode value if it is a buffer.

Closes #22.