Replace JQuery trim with built-in trim.