Patch serialization of ArrayObject, see https://github.com/schmittjoh/JMSSerializerBundle/issues/373