Add gd and HISTSIZE lowering.