Fix py3k warnings in the socket module