Add possibility of compiling tpie as a shared library, and explicitly mark public symbols as public