cmake: use execute_process rather than exec_program

exec_program is deprecated and execute_process is its replacement.
Merge pull request #164 from mathstuf/deprecated-cmake-command

cmake: use execute_process rather than exec_program