Add phpThumb support for Debian installations

Preview images are not shown in a custom field of type `image_media` when Wordpress is installed as a Debian package.

When wordpress is installed through a debian package (to `/usr/share/wordpress`), the upload directory is usually created outside the wordpress directory (the default is `/srv/www/wp-uploads/$DOMAIN`) and two global variables are set:

 * `$upload_path`: The upload dir on the filesystem
 * `$upload_url_path`: The base URL to the upload dir

With this patch, a check is performed if those two variables are set, and if so, uses the given upload path to retrieve the image.