Instead of using generic HAVE_BUILTIN_OVERFLOW, we need to check whether the overflow functions actually work as there was a bug in GCC that it would not detect mul overflow when compiled with `-m32` option without optimizations and the bug was fixed only for GCC 6.5+ and 7.3+/8+. For further details see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82274