Set CFLAGS propertly; add -std=c99 for gcc