Make Solaris dependency resolving more robust