Fixed feature detection failing with RequireJS

When using RequireJS, root refers to the require function and so the feature detection test will always fail.