Add `freeGlobal.self` check to support browserified code running in a web worker.