fix for bug #3517 HPUX hosts truncate the hostname to eight characters

modification of utsname functionality #1
Merge pull request #1016 from McAtte/hpux-fix-hostname-3.5.x

fix for bug #3517 HPUX hosts truncate the hostname to eight characters
 fix windows build failure by defining _SYS_NMLN
Merge pull request #1019 from McAtte/hpux-fix-hostname-3.5.x

 fix windows build failure by defining _SYS_NMLN