Added a check for GD support