fix processing browser field when reading package.json

When reading package.json for a relative require, the browser field
could be a string. We need to handle that properly.