Added option to set return type to assoc array

In order to make it possible to retrieve an associative array as the response from the web API we needed to add this functionality. I'm not sure if there is a better way to do this, but this seems to work fine for us.

The option to retrieve an array is much cleaner than writing a recursive wrapper that tranforms the stdObject to an array.