add proper support for ie8 and ie6