Two Malaysians were involved in the beheading of Syrian captives by militant group Islamic State, police said.