JRuby 1.7.4 and 2.0 mode only, fixes #11