protect from missing require when in browser

I'm using ometa-js on both server and client. For client I'm bundling it up with browserify, but ometa-js fails because of the extensions hook.  This patch skips the hook if the 'require' function doesn't exist.
it's better to do `typeof require !== 'undefined'`