Make examples and test progs depend on libraries