It's M5 in the drills I've just modified, just cut a piece of bolt to the correct length and cut a slot in the top to save a bit of money.

Also, if the gearbox opens at both ends, the correct sized o-ring can be used instead of grubscrews but it will allow slip and protect the motor and gearbox if it stalls.