provide getline when Mac OS X is version 10.6 and below