Core: have our own 'stringify' implementation, close #2381