Add an option to build a shared library.