ENH: use cleaner lgamma function from John D. Cook