Fix error with IE8 and earlier

IE8 and earlier don't support window.addEventListener so line 121 of jQuery.dialogOptions.js causes an error 

Amended to only use window.addEventListener if it is supported.  If not then don't try to add
the eventListener for orientationchange.