makefiles: fix osx path detection