Fix #193. Do not reference extraHeaders parameter, but clone it instead

to avoid header duplication when apps use a global variable