You need to explicitly make JS a global on WSH.