Convert url objects to strings before http_build_query