Fix loading Matroska index files on x64

OriginalPos is an unsigned integer of inconsistent size which can be
negative (due to being delta-coded), which makes the exact order of the
casts and manipulations very important.