Fixes to -Wl,-soname setting, support for Solaris.