Fix PlatformNotSupportedException in OnOffToggle