shim atom.serialize in <= 1.6
function atomSerialize () {
  var options = {isUnloading: true}
  if (atom.serialize != null) return atom.serialize(options)

  // Atom <= 1.6
  return {
    version: atom.constructor.version,
    project: atom.project.serialize(options),
    workspace: atom.workspace.serialize(),
    packageStates: packageStatesSerialize(),
    grammars: {grammarOverridesByPath: atom.grammars.grammarOverridesByPath},
    fullScreen: atom.isFullScreen(),
    windowDimensions: atom.windowDimensions
  }
}