[safestack] define COMPILER_RT_HAS_SAFESTACK in cmake
[safestack] check if mmap failed
[safestack] move a global variable to the only scope it is used