Fix IOS TypeError * if flags are None, then ' '.join(flags) fails * fixed get_defaults_flag so that it returns a list, and ignores lines with white space Fixes #26918