Changed from std=c99 to std=gnu99 since strsep is not standard