Various fixes to make hypermem compile