Add a build flag for switching to single-threading mode