Revert "build: fix bug #5590 by not linking in the static libs but the objects."