correct toJSON test to match node behavior
fix toJSON to be the same as real node.js Buffers