fix date parsing in safari