Powerful GeV emission from a γ-ray-burst shock wave scattering stellar photons