Do not encode key if it is a buffer in `record`.

Closes #26.