unifdef: avoid strndup() for non-standard C implementations