build under Mac OS X but also under NetBSD/amd64 6.1 with the default G++ compiler. This fixes PR pkg/47873 by myself.