* Electron version: 1.6.15
* Operating system: Linux

### Expected behavior

Open a `BrowserWindow` with passed options

### Actual behavior

  - Usually a Segmentation fault.
  - Sometimes `[12843:0100/000000.043847:FATAL:zygote_linux.cc(479)] Failed to synchronise with parent zygote process`
  - Sometimes `[12819:0100/000000.719122:FATAL:zygote_linux.cc(509)] Check failed: len > 0 (0 vs. 0)`

### How to reproduce

I'm still working on making a smaller reproduction case. The issue goes away with small tweaks.

1. Starting from https://github.com/daurnimator/fengari-electron-example
2. Modify main.lua to contain:
```lua
local js = require "js"
local electron = require "electron"

electron.app:on("ready", function()
	local win = js.new(electron.BrowserWindow, js.createproxy({
		backgroundColor = '#2e2c29';
	}, "object"))
	win:loadURL("https://fengari.io")
end)
```

atom/browser/api/atom_api_window.cc
auto buffer = node::Buffer::Copy(isolate, static_cast<char*>(val), size);
  if (buffer.IsEmpty())
    return v8::Null(isolate);
  else
    return buffer.ToLocalChecked();
}
}  
Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
               const mate::Dictionary& options) {
  mate::Handle<class WebContents> web_contents;
  
  mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
  options.Get(options::kWebPreferences, &web_preferences);
  
  v8::Local<v8::Value> value;
  if (options.Get(options::kBackgroundColor, &value))
    web_preferences.Set(options::kBackgroundColor, value);
  v8::Local<v8::Value> transparent;
  if (options.Get("transparent", &transparent))
    web_preferences.Set("transparent", transparent);
#if defined(ENABLE_OSR)
  
  bool offscreen;
  if (web_preferences.Get("offscreen", &offscreen) && offscreen) {
    auto window_options = const_cast<mate::Dictionary&>(options);
    window_options.Set(options::kFrame, false);
  }
#endif
  if (options.Get("webContents", &web_contents)) {