OpenBSD compilation patch with input from Antoine Jacoutot: thanks!