Add support for building shared library