Fix several port build failures