Fix compile errors with standalone builds