Fix reference error, express 4 removed headerSent in favour of node's headersSent