Additional changes so that this works for both CRuby and JRuby.
Merge pull request #2 from digitalreasoning/jruby_compat

Additional changes so that this works for both CRuby and JRuby.