Fix build issues in s2-common