Workaround for connect/express middlewares that break writeHead API.

A problem was discovered with express 'compression' middleware that
does not support passing headers to the writeHead() function. A
workaround is to always output headers using setHeader() function.