Substrate-mediated control of the microstructure of YBa2Cu3O7−δ thin films