Fixed issues with ternjs on windows