ensure importing the PTHREAD_MUTEX_RECURSIVE symbol

which is an enum and not a preprocessing macro so can't be caught using #ifndef
minor cleanings to avoid having older gcc versions complaining

because of ignoring the return value from some __sync** atomic builtin