Allow passing eventloop as an argument to connect().