add legacy.js for very old env