X-ray and gamma-ray limits on the primordial black hole abundance from Hawking radiation