The best answer I can find, is that garlic sometimes turns green if it is not fully mature or dry. The pigments in garlic can react to turn green when in the presence of acid. (perhaps the lactic acid in the butter) It also sometimes develops the chlorophyll that turns it green when its exposed to temperature increases. Green garlic is safe to eat.
http://www.gourmetgarlicgardens.com/pickle.htm -You need to scroll down 2/3 of the page to find the pertinent information.