Add version to JS files

This is an ugly hack but ok for now. Let's fix this with a refactoring later.