build: Check for libm

We use <math.h> in the library and the examples.
build: Use $(LIBM) when building libgthree
build: Use $(LIBM) when building some examples