use POSIX version of esrerror_r
Revert "use POSIX version of esrerror_r"

This reverts commit faa7ac7224a9a616bacec0c034455d156aabdc96.