helper to dynamically add javascript and css to headers