Preparation of bio-based terephthalic acid used to produce terephthalate polyesters