quick hack to make it support require js and support mono mode