Which European nation did Japan defeat in war in 1905?