fixed up the code to compile / run on 7.6
some test suite stuff is broken, doesn't matter for my purposes though. (but end user beware, don't  use this seriously)