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 should be `if(typeof require !== 'undefined' && require.extensions)`:
  - `typeof` returns string
  - there is no need to check `require.extensions` throughout `typeof`