fix Solaris compatibility issues (bug #4339)