Allow .js at the end of module names

Issue #1221