Fix #31: Check GD function existence before using it
Merge pull request #309 from romainneutron/fix-31

Fix #31: Check GD function existence before using it