Add require check for browser use