Fixed bug in last commit that broke CMake call.

This commit fixes generate.sh.  The windows script (generate.bat) has a similar bug that will be fixed in a subsequent commit.