extract function for adding a list of var names to js2-additional-externs