fix hostname truncation bug for hpux