[tool] fix building the 'dist' target on Mac
Merge pull request #900 from kingFighter/dist

[tool] fix building the 'dist' target on Mac