Fix possible linker errors by using CMake find_library macro