allow compilation with -fversion=BareMetal

reduced dependency on posix calls if using -fversion=BareMetal
if working with objects will need implementation or stubs of malloc, calloc,
realloc and free.
a few string functions are too required ( memcpy, memmove, memcmp,
memset, memchr and strlen ).
i was too lazy to provide proper generics.