Fix bug: building on MACOSX
Merge pull request #5642 from kaienfr/new_build_MACOSX

Fix bug: building on MACOSX