fix for INT32_MIN and older compilers