Merge "Use thread-safe lgammaf_r" into lmp-dev