Use portable format specifiers: Case %ld - plain - sscanf.

Fix uses of plain "%ld" within sscanf():
- Replace "%ld" with "%" SCNd64.
- Create (int64_t) local variable and sscanf into that.
- Safely downcast into previous type (introduce assertion, to be removed
  when variable type refactored).