Fixed an issue occurred in Safari iOS.

In iOS, a symbol existence check like "if (symbol)" causes an error.
To avoid this, needed to write as "if ('symbol' in window)".