Fix monkeypatches for rbx and jruby