Fix up the gcc tr1 special functions and add new ones.