fix ie8 bug where trim doesn't exist