add support for detecting bin/jruby in binary rubies, fix #2646