Fix a bug that class variable can't be referenced from class method

Class method defined in singleton class should be evaluated in class
context not singleton class context.

fix #2515
Merge pull request #2521 from kou/fix-class-variable-and-singleton-class-method

Fix a bug that class variable can't be referenced from class method