cherry-pick art compatibility fix with gcc 4.8