[1/2] fix thrift build on OSX

How about `ifdef EFD_SEMAPHORE`?