Move code inside #ifdef _MSC_VER to compat.h.