fix feature detection

the test I added would fail in firefox and I think ie also