use portable pthread functions instead of the non-portable

The pthread functions pthread_mutexattr_setrobust and
pthread_mutex_consistent are in posix nowdays. Use those instead of their
non-portable synonyms.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Check for GNU libc instead of linux for use of execinfo.h

Since execinfo.h is a GNU extension it makes more sense to check for GNU
than to assume that linux is GNU.

This is needed for building on linux with musl libc.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>