Variable High-Energy γ Rays from the Elliptical Galaxy M87