fix macos build

merge in [MAPREDUCE-5985](https://issues.apache.org/jira/browse/MAPREDUCE-5985)