Fix for removing old listeners

From https://github.com/LearnBoost/socket.io/pull/1080