Fix constant lookup issue in some versions of ruby.