Implement support for loading OS X libraries.

Refs #4993
Merge branch 'feature/osx-lib-4993' into next

Fixes #4993