Portability fix from schmitz@hp.com (Joachim Schmitz) for bug #548.