More sensible Array#hash implementation.