Fix thumbnails not working

Additional fixing: check GD existence and specific existence of imagecreatetruecolor function, for linux apt-get install php5-gd.