change linking to static
remove depency with gethostbyname: only IPs are allowed. otherwise it crashes