Add JRuby compatibility