conditional -lm flag for osx