Propagate cairo1 -> cairo , cairo -> cairo2 changes introduced by #997

Fix #999