[SSSD] [sssd PR#5493][synchronized] Backport of a number of patches to fix build issues of 1-16 branch on modern platforms