Only use strerror_r in threaded mode