Catch exception when document.domain is unavailable.