Fix issues with popupWindow, for iOS, not being defined.