Made the linecounter compatible with older bash versions.