Simplified handling of OSMesa case.