Use POSIX calls from string.h

Also use proper includes