Use d_reclen instead of sizeof() magic to determine the size of an entry.

Using d_reclen - which should also be available on Solaris - is a cleaner
way to calculate the size of a dirent structure. This avoids curious sizeof
magic, and avoids a segmentation fault on the OpenBSD implementation of scandir.