Make library basedir a flag