Update math.c
Merge pull request #2553 from bggd/patch-6

Fix build failed on VS2012