Added workaround for Jruby bug.
Merge pull request #8 from gwagener/jruby_support

Added workaround for Jruby bug