Fix: IE9 throws an error when using document.activeElement in a frame

* See thread 21536 for more information