Fix bug 4786 "remove type confusion in getsockopt call in sock_connect_async_cb"