Several fixes to the cmake build system.

I have tried to use `snowball` in my spam filtering system and found several issues when building snowball as a `cmake` subproject. These patches fix build and I was able to use libstemmer in my project.