core: Fix format functions on Windows

Don't use format attribute for MSVC
Only use Mac-specific parts of CMakeLists on Mac