Updated modal hacks to test for IE userAgent first