automake 1.14 compatibility.
Improve mul_mod specialisation when a larger int type is available for intermediate calcs.