[tools] yaffs2: fix compilation on FreeBSD