Fixed ZTS build and added mimetype to identify image as per PECL bug 65037