TypeError: {} is not a function
_I am..._ Reporting a bug or issue

**Expected behavior:**
Should build

**Observed behavior:**
`TypeError: {} is not a function. (In '{}("")', '{}' is an instance of Object)`

**How to reproduce:**
Using package versions
```
"prop-types": "^15.5.8",
"react": "^15.4.2",
"react-dom": "15.4.2",
"react-sketchapp": "^1.0.0",
"react-test-renderer": "15.4.2",
"webpack-shell-plugin": "^0.5.0"
```

Build this
```
class Document extends React.Component {
  render() {
    <Artboard name="Test">
      <View>
         <Text>Sign up</Text>
      </View>
    </Artboard>
  }
}

const onRun = () => {
  render(<Document />, context.document.currentPage());
};

module.exports = onRun;
```
**Sketch version:**
48.2

**Please attach screenshots, a zip file of your project, and/or a link to your github project**
![image](https://user-images.githubusercontent.com/1141369/34802885-387d5456-f6c4-11e7-815c-aca27c6e34ac.png)

![image](https://user-images.githubusercontent.com/1141369/34802899-4b8be74c-f6c4-11e7-81f0-2dd1f15778c2.png)

