perceptual hashing in javascript