Migration to ES5 function for lang.trim() and dojo.trim()