Accomodate Android 4.0.3

I'm not sure what we are losing by testing for window rather than the Window constructor.