Include glib.h instead of glib/gthreads.h

Newer versions of glib do not allow us to include individual submodules of
glib anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Makefile: Add -lm to the linker command line

Otherwise the build fails on some systems (Debian testing x86_64).

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>