Refactored MurmurHash3 function