Fixed MutationObserver not being defined outside of a window by using
the page's winow.