Update connection handling to be compatible with modern socket.io.