Flash detection and IE8 bug fixes

Minor fixes for bugs we encountered while testing a new application we're working on.

Flash detection was broken for users who don't have flash installed.

IE <= 8 sometimes won't have an extended element (like document.window) so the element needs to be manually extended.