Secondary-structure switch regulates the substrate binding of a YopJ family acetyltransferase