fixed some linking problems with math.h library