Use the NI_MAXHOST constant to initialize the size of the hostname buffer.

The NI_MAXHOST constant should be used when creating the hostname buffer to adhere to the behavior defined in [RFC2553](https://www.ietf.org/rfc/rfc2553.txt) (and also to avoid potential buffer overflows).

References:
- [getnameinfo(3)](http://linux.die.net/man/3/getnameinfo)
- [getnameinfo function (Windows)](http://msdn.microsoft.com/en-us/library/windows/desktop/ms738532%28v=vs.85%29.aspx)