Adding window.top for better browser compatibility

This adds support for window.top. Which is basically window in the case of Ejecta.