The role of grid extensions in a cost-efficient transformation of the European electricity system until 2050