build system fixes