Avoid overwriting or mis-detecting self/window polyfills

window may be polyfilled in a webworker setting, which-- under
the original code-- leads to a false sense of self on FireFox.