update tern and improve bower support