avoid potential zero division resulting in nan in agg::gamma_linear - closes #761