main/cryptsetup: fix segfault in error reporting

Problem is that strerror_r in glibc is non-conformat with POSIX.

ref #3470

reported upstream:
https://code.google.com/p/cryptsetup/issues/detail?id=237

(cherry picked from commit d98d14163e40a9bbc90bb7ad84876ec069b94fdd)