Fixed memory in leak ImageCreateFromString().
Fixed a bug that prevented proper identification of WBMP images and thus
prevented ImageCreateFromString() from working on those images.
This initial checkin has no changes to any of the libgd code so it can
be used as a basis for diffs. It also will not build currently because
of this. The PHP gd checks need to be incorporated along with a bit of
other config magic. It also shouldn't break the build and will only
take effect if you use --with-gd=php right now.