prefer directory with static .a files for find_lib

If isolate_dynamic is specified, then the .so files will be put in a separate
`dynamic' directory, but the way this used to work is that it would add the
-L/foo/bar/dynamic path to the linker path so you might end up with the
dynamic lib anyway!