Add an internal switch to support calls from build system