Fix adding flags for dependencies