Fix weird math function bugs on windows (could be llvm bug)