class_variable_set is a private method in 1.8.7.