specify lm for weak linkers that can't find libmath fixes #7