protect NoMethodError from calling to_hash in ==/eql?; close #2002