Hacks to get it compiling with maven and a minimum of dependencies