Fixed Safari6 errors on /borrow.

Safari 6 is failing with weird javascript error in websafe function.
Added try-catch handle it.