Fix adapter in iOS5

Compare instanceof window.constructor instead of Window