gd: fix typo and cleanups
Merge branch 'PHP-5.5'

* PHP-5.5:
  gd: fix typo and cleanups