Guard malloc includes for Apple
Find CUDA correctly for OS X