Allow objects within content passed to addPostFields

While working with JSON I had decoded into an array that contained standard class objects, I found it difficult to use addPostFields in preparation for transmitting this data in an HTTP request.

These two small changes helped me.

Not sure if this violates a design decision that addPostFields should, intentionally, only contain arrays and strings.  If so, would you consider this change if it contained an additional check to make sure any objects are of the type StdClass (to ensure that they can be properly cast)?

Curious for any thoughts here.

Sam