Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.