Fixed IpAddress::getLocalAddress on OS X and improved SocketImpl for Unix & Windows