Conditional g prefix on Mac

(cherry picked from commit 3e3a8817803ef3e8d00cecec09e6a2438739bd57)

Conflicts:
	tools/makegarbage.sh
	tools/wordlistfromperseus.sh