Small fixes to allow compilation with OpenBSD