Thai coup sparked by failed war on Islamists