Fixed bugs with backwards/ext in gcc, string.h include missing and crashes when reads are shorter than k