Make generation of SWIG files more robust wrt different build and source directories