Move MutationObserver shim

Since it will be used only for older Safari versions, move it to Safari
related code, so it doesn't pollute the content scripts.