Change order of building strdup.c
Add/Remove lines of code to decrease warnings and finally avoid seg fault!