Measurement of the cosmic ray spectrum above 4 × 10^18eV using inclined events detected with the Pierre Auger Observatory