Mechanisms for the formation of acetylglycosides and orthoesters from acetylglycosyl halides