backward-compatibility for socket.create_connection in 2.6

Closes: #5208