Fix musl build by using fts_* from external library
musl does not support fts. There is however a standalone package that can be used, but it must be linked against. This commit adds a check that makes sure to link to the external library if it is required.