Improve support for shared libraries on Solaris.