Fix Foldable instance for IntMap (fixes #579) (#593)