Fix compilation by using std::ptrdiff_t instead of ptrdiff_t

Compilation on OSX was working with clang++ but not with a custom g++.