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

Fix bug: building on MACOSX
Merge remote-tracking branch 'origin/master' into master_0.9.7