Fixed #4927: Support XMLHTTPRequest in JSB for templates