Bromine metallization studied by X-ray absorption spectroscopy