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..5a3ed12 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
@@ -326,11 +326,9 @@ 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;
-      }
+    if (function_exists('imagegd2')) {
+      // GD2 support is available.
+      return TRUE;
     }
     return FALSE;
   }
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..974ffe7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
@@ -45,11 +45,9 @@ 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 (function_exists('imagegd2')) {
+      // GD2 support is available.
+      $gd_available =  TRUE;
     }
     if (!$gd_available) {
       return array(
