fix __dirname in compiled build