[TIMOB-15131] (3_1_X) Link against gnu std c++

Backport of PR #4688

Fixes [TIMOB-15131](https://jira.appcelerator.org/browse/TIMOB-15131)