A measurement of pp→π+π− and pp→K−K+ for small values of t and u at 3 and 4 GeV/c