Make go script work on both Linux and Mac OSX