I found a nicer fix. There is a feature detection macro we can use instead of just using C++ version.