Avoid errors from enumerables on Object.prototype

Uses the same pattern as ServerResponse.prototype.writeHead in
Node.js core.

fixes #18