Updated to use feature detection.

The browser version sniffing code stopped working in IE11. Feature
detection fixes the issue.