setup script fixed for OS X