fix shared library build on darwin

Evan Hunt requested to merge each-fix-macos-build into master

Macos dynamic library builds produce "undefined symbol" errors if you don't use -undefined dynamic_lookup when compiling.

Merge request reports