fixes to allow auto building on an amalgamation of the project (bundled
in adapters)