Fix bug in jl_readline()

jl_readline() didn't return correct number of read bytes for the
last line, if the file didn't end to newline. In that case it
returned -1.
Now it returns the correct number of bytes if it encounters EOF before
newline and the next call will return -1.