More fixes for namespaced builds

Change-Id: I485d845fd9a8c553b8b96e6f2c8775608d1c1523
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>