Add method to build a query string.