CMake: add missing optimization flags

I noticed that CMake appears to not automatically add optimization flags. So these were missing for me:

```sh
$ cmake --version
cmake version 2.8.11.2
```