fixes issue #565

the basic problem is that document.documentMode was introduced in ie8, so on ie7 or ie6 we compare `undefined < 8` which will be false.
i'm not sure if this is the most elegant solution, but it solves the problem.