inherits_browser: add AMD support

messy whitespace is to keep the diff small.