JavaScript dictionary that supports object keys