Warning fixes; remove incorrect uses of strncpy.
Add strlcpy compat function.