OpenBSD compatibility

With some fairly minor changes, galera builds and works on current OpenBSD