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

Fixes bug #3517 where HPUX hostname is truncated to 8 characters

Added a global struct with initialised variable plus an initialise function that is called from generic_agent.c