adapt to jRuby1.7.6