port hashing to Rust 0.11