Handle pthread attrs being unavailable

This is the case on HP-UX, where pthread_attr_init() returns ENOSYS.