adapt to comit b1ee8b288 in matplotlib