ironing out cross-browsers issues in .is.date() method