move strndiff and strdiff to node.c and make it private