They weren't living on Mars, though. Surviving in a fairly hospitable natural environment where a small cluster of people can sustain itself by gathering, fishing and hunting is one thing. Surviving on a planet without its own ecosystem, where the only way to stay alive over the long term is to maintain a high-technology industrial base is quite another.
The genetic diversity isn't the limiting factor here. For a Mars colony to be self-sustainable (without planet-wide terraforming), it would have to be able to support a huge operation of mining and resource extraction, processing and production, construction, manufacturing, agriculture, waste processing, water reclamation, air filtering and recycling, and repairs. Without huge advances in self-organizing and self-repairing robots, this would require a human workforce of a size that would make inbreeding irrelevant.
And if you're going to assume massive scientific and technological development to make the concept viable (which is probably necessary in any case), there's no reason to limit yourself to natural breeding. We have sperm banks and egg banks on earth already, so it would be relatively easy to provide the required genetic variation through IVF treatments, even if you only have a tiny group of human colonists. Or you could imagine electronic gene databases that could write any desired DNA sequence (stored or procedurally generated) into a sperm or egg cell.