Adapt cap_openni.cpp to the new Ptr.
Merge pull request #1565 from SpecLad:cmake-new-ptr