Cost-Optimal Planning with Landmarks