Removing master cylinder studs

I would take an angle grinder with a cutoff wheel on it and carefully grind the head off down even with the bracket. The rest of the bolt should fall out or need very little persuasion.