Fixed tests build settings and files linking messed up by Xcode in some of the previous commits