SERVER-16200 Improve LTO integration for gcc and clang