Workaround cairo-surface crash