cmake: fix BSD link, only link with librt if it exists (closes #75)

--HG--
branch : stable
version: detect OpenBSD for version string (closes #76)

Fix from Brad Smith

--HG--
branch : stable