Fix date comparisons

`==` operator returns true only if the dates on both sides of the operator refer to the same object.
```js
var a = new Date(1);
var b = new Date(1);

console.log(a == a);  // true
console.log(a == b);  // false
console.log(a.getTime() == b.getTime());  // true
```