fix res.setHeader() patch to work with cookie updates