fix medialibrary admin to work with new extension mechanism

It seems to be working fine but I haven't run the test suite.