Update time.js

Added changes as suggested by https://github.com/craftyjs/Crafty/pull/396