fix compile issue with ptrdiff_t def