fixes for SunOS