[Bug 53918] Building with external PE libraries fails when static libraries are also installed