Fix issue 2698 - Implement pragma(mangle, "...")

This is revived pull #1085
I've took into account the comments made in the discussion of #1085