gearman: fix build "tr1/cintypes" error on OS X 10.9

A fix for the "tr1/cintypes" build issue on OS X 10.9.
Related to #20635, #20625

Also see discussion in #22259