PHP: Fix for open_basedir and ImageMagick detection.