updated build system to build static and shared libs from the same objects