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

 fix building the 'dist' target on Mac