Use proper -lm vs -lm_hard

Change-Id: I7d63bdc30c53689183358050bba6bc3da4a78aaa