fix find_library on Solaris (closes #5289)