Planning Under Temporal Uncertainty Using Hindsight Optimization