php-5.4: Don't build gd as a dynamically-loaded extension

We didn't do this in PHP 5.3 either, so it causes regressions if
php.ini isn't set up to load the gd extension.