Update the method 'trim' for redefine.js