Fix #5110.

Expand the JSON representation of `Buffer` to include type information
so that it can be deserialized in `JSON.parse` without context.