Newer versions of Ubuntu ship with >g++-7, so there will be less of a need as time goes on to perform this hack.