(bug #5904) Fix OpenBSD and Solaris builds