fixed osx link errors