Fix definition and testing of S_ISSOCK.