Add macro for Mac OS X to avoid compile error with strerror_r
Merge pull request #555 from hido/fix_macosx_error

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