Add optional delim argument

This is useful for parsing/stringifying cookie values.