added some rules to modify serval files in place to support building on the mac