scripts/git-tool: Better detect Darwin's getopt