Be a little more defensive about calculating SSIM
Fix small crash bug
Add #define guard to including IO with PVRTC