Link against known_dirs, fix linker error