Fix #to_json for BasicObject Enumerables