Add gamma functions

These are used by the libcxx test suite.