Updated to support a static and shared build