Added missing checks for strlcat/cpy, fixes for few build issues