cmake: try to fix 'ld: warning: duplicate dylib'