Fix build_query when the value is an Array or a Hash

When the build_query method is called with a Hash containing nested values like an Array or another Hash, it's  building a wrong query...

For example:
Currently,
build_query({names => ['Bruno', 'Samantha', 'Alexandre']})
Produces: "names=Bruno&names=Samantha&names=Alexandre"

When the correct format would be: "names[]=Bruno&names[]=Samantha&names[]=Alexandre"