fix error checking in pthread_getname_np