Fixed cleanAckedMessages so it compiles on linux as well