Fix comparison objects.

Regexp and Date objects can to be deep equal to objects with the same type.