Fix build system after becoming a shared library