handle libc implementations which do not provide `error.h`
Introduce a configure time check for the presence of `error.h`. In the
case that `error.h` is not available, we can fall back to `err.h`.
Although `err.h` is not a C standard header (it is a BSD extension),
many libc implementations provide. If there are targets which do not
provide an implementation of `err.h`, it would be possible to further
extend the implementation to be more portable.
This resolves bug #21008.
Signed-off-by: Saleem Abdulrasool <abdulras@google.com>