Added code to choose which extensions run in a browser environment