fix(directive): make directive compatible with IE9+