Fixed casting issue in UnixFromDateTime (win)