Fix date parsing in Safari