C dictionary implementation with a dual-key hash function