You could over-complicate things and mount encoders on each side.
Or you could record each side's RPMs and do
Faster Side RPM / Slower Side RPM
Multiply that value by the speed you would normally output to the faster motor and you are done. This theoretically will vary with battery voltage and the like, but it comes to the point where it is not noticable.
Sample code:
Code:
#define SPEED_COMP .95 // This is Faster Side RPM / Slower Side RPM
// Assuming your left side is faster
RIGHT_SIDE = p1_y;
LEFT_SIDE = p2_y * SPEED_COMP;
KISS.
EDIT: Happy 700th post to me =)