Guard against problem that occasionally happens in old jrubies