Privacy advocates turn tide in homeland security debate