Fix compilation issue in Solaris systems (SmartOS).

The dirent struct in solaris doesn't include the following attributes:
    - d_reclen
    - d_type
    - d_namlen
As a consequence, they have been commented out in the deep copy stage, and the bcopy call now uses the strlen function to get the name len.
strings.h has been included too in order to provide an explicit declaration of bcopy.