Only transform hashes to Hash::AsObject objects, leave other structures
alone, since Hash::AsObject doesn't support them and throws warnings
during global destruction.
Merge pull request #1 from mschilli/hash-as-object-fix

Only transform hashes to Hash::AsObject objects, leave other structures alone