Thailand flood toll reaches 40