fix feature detection for gcc 5 or later