Fix a capability check that raised an exception in IE8.