Support for compiling as shared library.