Moved string trim to shim.js