The first invocation after scalajsc has been added to the path, it seems to not find the Scala.js library (log follows). The next invocation works as expected.
How to reproduce (use foo.scala from test cases):
> set PATH=%PATH%;<...>
> scalajsc foo.scala