Added OSX battery support