You are right, libm should be added to the linker flags. So far it only works by accident; either because of one of the included library's dependencies or because of gcc, which has builtins for most libm functions. I added a check to the configure script.