Fix for osx makefiles.
Merge branch 'bugfix-osx-makefiles' into develop