[bugfix] Fixes GMP test.

Previoulsy CMake always fails to find the __gmpz_abs symbol on my machine, even though it is clearly there.
The test used check_symbol_exists. According to the documentation, check_symbol_exists tries to include the
second argument into a test program to check whether there is a prototype for the first argument, so as the
second argument is a binary, that can't really work... This patch switches over to use check_library_exists.
(cherry picked from commit 79cc2c42219b316e86f2c07f3812c671690c7262)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>