Fix missing gamma function definition in mingw32.
Replaced gamma() with tgamma()