Fix expmod to work a bit faster