C89 standard fixes, based on feedback from IRIX port