France says ready to keep troops in W.Africa for as long as needed