Remove redundant libraries on link lines in cmake files.