Fix specs when running on JRuby