fixed Mac OS X build error (function 'lgamma' differs between Windows/UNIX)