Fixed compatiability with pHash ruby gem (https://github.com/toy/pHash).

see http://stackoverflow.com/questions/23414036/segmentation-fault-error-when-trying-to-compare-two-videos-with-phash-library-an