libgpkg: make RUBY_VERSION check more accurate