fix unicode error in parse_cookie -- works both in py2 & py3