Add macro for Mac OS X to avoid compile error with strerror_r