Add cuda_enter and cuda_exit as extensions.