DISTRIBUTION build flag fixes

tested with 'make V=99 DISTRIBUTION=true' for a full build under Ubuntu