Sort keys retrieved from cookies to avoid browser incompatibilities in specs