Add conditional require for browser compatibility