Added -lm, which is required for math.h on some systems