Install libgd-dev when --with-gd option is enabled