Store CMAKE_AR and CMAKE_RANLIB in CMake CACHE so that the values persist to user CMake toolchain files. Also CACHE the variable Emscripten, in the hope of that fixing the visibility issue with variable. Some users have reported that in their CMakeLists.txt files the variable EMSCRIPTEN is not always visible, even though in the Emscripten cmake unit tests it always works. Fixes #2288. Thanks mhenschel!