scripts: fix build in a symlinked directory