fixed cmake for osx libraries