nix: static/shared fixes, test-ldso builds, run fails