cmake: use execute_process' whitespace stripping

Refinement to #164.