Detect if char equals int8_t
This happen to be the case for SmarOS/OpenSolaris.
This is untested on these platforms as they are not officialy supported.
Backport of core PR13580
make check ninja check
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3815