Updated build process to build a shared library on Linux and OS X