Fix CMake errors in certain build environments.

In some cases, we'd get the following error:

"string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command."

This fix overcomes that issue. I suspect the "output" was empty on these setups
and that'd cause the command to fail. This ensures that the empty string is
recognized correctly as an argument.

Change-Id: If539c4f169602bb4fd9a00242b02badf2d7e82e4
Merge topic 'fix_determine_version' into next

7650e99 Fix CMake errors in certain build environments.
Fix spelling.

Change-Id: Ie745a4d7fb1e4852f39869c144cdbbbe0b307624
Merge topic 'fix_determine_version' into next

17b7580 Fix spelling.