Fix thumbnail colors in case of image with color profile

This should fix #237