Fix some issues on OpenBSD