Refactor the workaround for JRuby 1.7.4

I made the JRuby work around a bit more specific and documented the problem.
If this meets your approval @myronmarston, then I'll merge it and pick across
the commit to 2-14 and 2-99.