[MOSYNC-2925]

Also a build fix for 64-bit linux.