X-ray absorption near edge structure in solid Kr and KrF2