Fix for node server side react rendering. window undefined

When compiling react components server side, window reference throws error in node:

```
/app/components/react-draggable.js:62
var isTouchDevice = 'ontouchstart' in window // works on most browsers
                                      ^
ReferenceError: window is not defined
```

I added a conditional wrapper to fix this issue.
I worry that this conditional isn't conclusive enough. If browser is using AMD `require` will be defined. Also not unreasonable that someone may define `module` in the browser.

I would vote for one of the following:

```js
if (typeof window === 'undefined') {
```
or
```js
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
```