libs/httpclient: fix cookie handling (#141)