OpenBSD doesn't use librt. Don't link against it there.
Add OpenBSD to various #ifdefs.