Adding support for jRuby.
Merge pull request #1377 from lephyrius/jruby-support

Adding support for jRuby.