Make placeholder objects usable in __device__ code.

Fixes #354