added battery support for OSX