fix to date object for safari