Cmake fixes for #238