Sort keys when building the query string