Add unsafeWindow fallback