Improve compatibility with JS modules

If a module ended with a single line comment `\\` then the appended
`;})();` was being ignored and eaten up as part of the comment.