[FIX] fix sizeof for stream positions

- replace sizeof(streampos) with sizeof(streamsize) since only the
  latter is guaranteed to be a typedef of a fundamental type