link libm on systems where it's needed