to_hash fix for Array of non-structs.

If the struct has an Array of ints or somesuch, then there's no to_hash
method to be called on them. Seems that method in there could maybe be
shored up with just something around respond_to?