Merge pull request #12109 from deannagarcia/cherrypickOSX

Cherrypick osx static linking fix