cmake fix for build error when leap library is missing