Don't know of a software way to do that - it is a hardware problem, and needs a hardwrae solution.
1. Get a longer cable and reverse the speakers.
2. Or - get a short patch cable - stereo minijack to a pair of RCA female connectors. And a female stere minijack with two RCA male plugs. Then just reverse the RCA connections.
You have to physically reverse the stereo pairs.