Added workaround for old xcode compiler bug (#3716) * Added macros to disable std::filesystem and std::variant as a workaround for old xcode bugs * Change macro to positive logic