Namibia survive scare