Fix bad assumption: UIApplication's delegate does not always respond to -window