Fix key codes test on old IE