Guard use of CUDA built-ins from foreign compilers.

Fixes #5