Fix cookie parsing when there are no cookies on python 3