Turkish police detain 27 people over links to Islamic State