Adding event-listener for ie8 and ie9