Cmake build: 'callstack printing' detection.

Instead of depending on compiler we try to check for working
API as is done now for automake build too.