Fix bug in enqueueNDRangeKernel causing crashes and exceptions on 64-bit systems