Failed coup in Turkey: Erdogan thanks Pakistan