Add infrastructure for building shared library on OS X.