Merge pull request #9569 from vovkasm/pull/cmake-cleanups

cmake: cleanups
fixing windows8 build
default lock macros to nothing for unsupported platforms
default lock macros to nothing for unsupported platforms
Merge pull request #9588 from mannewalis/windows_allocator_fix

fixing windows8 build