Bug 923897 - Extensibility support for b2g

fabrice's patch, rebased