Improved error reporting in module.c.
Fixed typo preventing symbol export in search.c.
Fixed insufficient match condition for strnlen.
Removed reent.h header, using the errno field in OSThread.h for errno instead.