Why not just code this as 

} else if (pj_scan_stricmp(scanner, "icid-generated-at", 17) == 0) {
  ...
} else if (pj_scan_stricmp(scanner, "icid", 4) == 0) {
  ...