add libm support