CMake script bugfix provided by Nat Hocken.