Support hostnames longer than 64 chars

On Linux, `HOST_NAME_MAX` seems to default to 64.

There is however `NI_MAXHOST`, which is used by many tools already, and supports much longer hostnames by default.

On current Ruby on an Ubuntu 14.04 system, the current behavior can be reproduced with the following code IFF the hostname is >= 65 characters:

``` ruby
require 'socket'
Socket.gethostname
```

/cc @charliesome