support either #to_h or #to_hash in Behavior#merge!