Add check for applicationCache to fix error in IE9