specify lm for weak linkers that can't find libmath