Fixes for running tests on jruby