In which wars was France defeated?