build-sys: don't mix dynamic and static libs