Check that the variables values are as expected in C++. Note that the check_values global function is global in Ruby when using -globalmodule.
This commit fixes swig#1653 by creating a Ruby virtual variable for a C/c++ global variable when SWIG is invoked with the -globalmodule option.