Fix check for JRuby in slightly broken Ruby envs. Closes #108