Resource: use #const_defined? with arity 2 (ruby < 2 specific, issues #2497, #2503)