lib: move errno and strerror to legacy FFI