JRuby: Better test env detection