Fixed autoconfigure for mac