Some small build system fixes