Check for the existence of specific functions instead of just checking

to see if GD is bundled.  This provides granular support in more cases.
Resolves http://dev.kohanaframework.org/issues/4735