JWST observations of 13CO2 ice. Tracing the chemical environment and thermal history of ices in protostellar envelopes