don't fail when cookie ends with ;

a cookie string such as "a=1;b=2;c=3;" will cause this to fail.