Naturalising intentionality: A teleological approach