correctly specify http header, and updates drupal_add_js call to drupal 7