fix Issue 10117 - Support C++ class-scope static variables

http://d.puremagic.com/issues/show_bug.cgi?id=10117