Fix checks for JRbuby and Rubinius in tests.