Added check for php-gd