Cmake fixes

Continuing from https://github.com/Emdek/otter/pull/192#issuecomment-36239973