nano time fix
Merge pull request #4 from sritchie/feature/nano_time

Protect against possible non-existent `js/window` in top-level def (@sritchie)