Measurement of the charge asymmetry in top quark pair production at the Tevatron