fix regular expression in ClassGen#is_constant_defined?

Minor fix.