examples/cmake: Fix iio-monitor dependency checks
examples/cmake: Fix iio-monitor dependency checks

Running cmake for the examples warns:

    -- Curses Development Kit (CDK) missing or too old, skipping iio-monitor

This happens because PTHREAD_LIBRARIES is not set.
Fix that by looking for the phtread library first.

After that it fails with:

    Unknown CMake command "check_symbol_exists".

Fix that by including CheckSymbolExists.

Fixes: 88b946f4b897ea18 ("iio-monitor: Now the c90 warnings are gone, fix real warnings")
Signed-off-by: Geert Uytterhoeven <0da414d9d963da4039c2a0525b1844228075aa58@linux-m68k.org>
---
On Ubuntu 20.04.2 LTS.

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio