fix(service): add shim for indexOf and trim #638
fix(service): use hasOwnProperty of prototype #638