FIX: IE8 support in jquery.ondemand.js (fixes #2872)

Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim