Add missing include.  We get away with this on most platforms but it breaks the build for VS2013 Express.
gethostbyname() is deprecated in VS2013 so use getaddrinfo() instead.
Merge remote-tracking branch 'upstream/master'