Fix check for skipping libgcc/libstdc++

This was intended to be fixed by
5b17faad4de52a952cf2e66cfc25008e82c274af but the code
never worked.