As other researchers have pointed out, genes for handling oxygen (and metabolic cycles in general) are often repurposed (with cycles even reversing direction over evolutionary time scales). So the lineages that apparently "used" oxygen may in reality have simply had the ability to tolerate it or safely dispose of it.