- Electron version: v1.4.0
- Operating system: macOS 10.11.6

Given the following `main.js`:

``` js
const {powerMonitor} = require('electron')
```

I get the following exception:

```
$ electron .
App threw an error during load
TypeError: Cannot match against 'undefined' or 'null'.
    at Object.<anonymous> (/usr/local/lib/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/power-monitor.js:2:46)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.get [as powerMonitor] (/usr/local/lib/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/exports/electron.js:65:14)
    at Object.<anonymous> (electron-test/main.js:1:87)
```

atom/browser/api/atom_api_power_monitor.cc
#include "atom/browser/api/atom_api_power_monitor.h"
#include "atom/browser/browser.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"
namespace atom {
namespace api {
PowerMonitor::PowerMonitor(v8::Isolate* isolate) {
  base::PowerMonitor::Get()->AddObserver(this);
  Init(isolate);
}
PowerMonitor::~PowerMonitor() {
  base::PowerMonitor::Get()->RemoveObserver(this);
}
void PowerMonitor::OnPowerStateChange(bool on_battery_power) {
  if (on_battery_power)
    Emit("on-battery");
  else
    Emit("on-ac");
}
void PowerMonitor::OnSuspend() {
  Emit("suspend");
}
void PowerMonitor::OnResume() {
  Emit("resume");
}
v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {