Fixed 'self' variable in Safari (desktop & iOS)

The old method to set 'self' variable worked incorrectly in Safari web browsers. So I propose the fix to make it work good on all browsers & nodejs as well.
Nitpicking: if you use `Object.prototype` you won't need to create a new object just to discard it.

Code Style: please use `===`