cmListCommand: Avoid std::function move constructor on aarch64
Since !2836 (merged), some of the RunCMake.{list,PositionIndependentCode}
cases have crashed on an aarch64 build with GCC 6. Avoiding use of the std::function
move constructor avoids the crash. Use a strict preprocessor condition to use this workaround only where needed.