skip bytes if the current input stream is messed up until we reach the
first byte of the magic header