Threshold resummation for dijet cross sections