protect from missing require when in browser