Ensure transitive library dependencies

foo.exe depends on libfoo.a which we build.  libfoo.a in turn
depends on -lbar.  So, when we link foo.exe, we need both
libfoo.a and -lbar