Fix issue with jQuery cookies not being set