support non-javascript-friendly identifiers

Alloy creates bad javascript code when id write something like <View id="my-view"/>. Problem is the '-'
The provided change fixes that problem.