Fix line ending parsing issues in spcomp on windows

fgetpos fails with UNIX \n new lines on windows if the file was open in
textual mode.
Merge pull request #62 from peace-maker/lineendings

Fix line ending parsing issues in spcomp on windows.