Detect gar

Detects first gar, then ar to assist on non-GNU systems.