Fixes in getline.c used for better portability