Build shared library