More fixes to support building as a PCL