Refactored iframe creation to work with IE9.