Added option for building shared library