Added in 3.6
$powmod(base, exponent, modulus)