Add option to build shared library