Fix CUDA compatability of calloc()