cmake: fix include dirs and libs lookup