add support for ffs libc function.
Merge pull request #2487 from sronsse/ffs

add support for ffs libc function.