Fix build for JRuby