YARN-2161. Fix build on macosx: YARN parts (Binglin Chang via aw)