Change all ' in custom headers to \' to avoid phantomjs syntax error