updated CMakeLists to support FreeBSD