Fixed weird targets to allow for both static and shared library compilation