Avoid direct dependency on java.lang.management APIs to allow usage on
Android (GitHub #150).