Add libc math function detection and replace