Don't add rpath for system paths.  Uniq args.
Avoid using /bin/print on SunOS.

It isn't a bash builtin, but is tested first before printf, so we end
up using it and having to exec it many times.  Make it a bogus command
so that we pick the builtin printf instead.