Computing GCD for a variable number of arguments