Merge pull request #1013 from kacfengine/3.5.x

[3.5.x] Fix stack corruption when calling VerifyEnvironmentsPromise().
Remove global PROMISETIME
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
Fix compile error because of missing libpromises dependencies.