Fixed #1711

I think i missed the point that cookies can be Dict or CookieJar.
This fix will work for MozillaCookieJar.