Fix for a pointer truncation bug that is surfaced on Mac OS-X