Implemented JSONP support in the REST API; attempted CORS support too,
but not working yet.