Find a loop in a singly linked list