Fix IP extraction for socket.io