Add shim for String.prototype.trim

Line 1180 of version 1.7.2 uses value.trim() but it fails in IE<9.