Fix broken specs under JRuby