JRuby support
Merge pull request #2 from kron4eg/jruby_compat

JRuby support