t5551: handle v2 protocol in cookie test