Fix missing flags when linking libraries against other libraries.