math.mod was renamed to math.fmod; also made significant performance micro-optimization!!1!
Merge pull request #1 from payload/master

made it work in lua5.2