Radial bunch compression: Path-length compensation in an rf photoinjector with a curved cathode