getline: split out for darwin systems