Fix for images with alpha channel data on Mavericks; thanks to Mark Culler for the patch.