Corrected JS Date instance detection

use instance of instead of typeof to identify
object inherited from Date is better.
Merge pull request #7 from DaNmarner/patch-1

Corrected JS Date instance detection