fix compilation problems under SunOS