diff --git a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
index b58939e..5499c94 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
@@ -326,13 +326,8 @@ public function createTmp(ImageInterface $image, $width, $height) {
    * {@inheritdoc}
    */
   public static function isAvailable() {
-    if ($check = get_extension_funcs('gd')) {
-      if (in_array('imagegd2', $check)) {
-        // GD2 support is available.
-        return TRUE;
-      }
-    }
-    return FALSE;
+    // GD2 support is available.
+    return function_exists('imagegd2');
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
index 89b9645..805ee22 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
@@ -44,14 +44,8 @@ public static function getInfo() {
   }
 
   protected function checkRequirements() {
-    $gd_available = FALSE;
-    if ($check = get_extension_funcs('gd')) {
-      if (in_array('imagegd2', $check)) {
-        // GD2 support is available.
-        $gd_available =  TRUE;
-      }
-    }
-    if (!$gd_available) {
+    // GD2 support is available.
+    if (!function_exists('imagegd2')) {
       return array(
         'Image manipulations for the GD toolkit cannot run because the GD toolkit is not available.',
       );
