The definition of terrorism needs to change in the face of a new threat from attackers radicalised by extreme violence, the Prime Minister said.