Use correct cmake *_FOUND variables
(cherry picked from commit 74759e9ac2520764aec365e3275dfc9ba025861f)