Fix ManagementFactory compilation error, and bug #179.