fixes for OpenBSD (5.4)