Add a try/catch block to the feature detection for older browsers.