Treat \stdClass as an array (fixes #43 and rel.)

Fixes the following open issues on JMSSerializerBundle as well:
* https://github.com/schmittjoh/JMSSerializerBundle/issues/158
* https://github.com/schmittjoh/JMSSerializerBundle/issues/270