make math.h more c++-friendly