Fix OSMesa issues.