Fixes to allow sp api stuff to work over jsonp