Fix CustomEvent ie compatibility