picked %% from jashkenas/coffee-script#2887