[CMake] Fix shared library versioning on OpenBSD and NetBSD.

Fixes #1440.

* CMakeLists.txt: Implement it.
1 file changed