Do not use ternary in a require call

Webpack has trouble with this: https://github.com/webpack/webpack/issues/627

This could be seen as a bug in webpack, but a fix here would be very helpful.