Adds closed attr to polyline.