Improving on @bartvde's build fixes